<?php
/*
+ --------------------------------------------------- +
|  Ineo Article Manager - Version 1.x
|  Copyright © 2005-2008, Dan Cryer and William McGann
+ --------------------------------------------------- +

Ineo Article Manager is free software; you can redistribute it and/or modify
it under the terms of version 3 of the GNU General Public License as published by
the Free Software Foundation.

Ineo Article Manager is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Ineo; see the file License.txt.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.

*/

class upgrade_versions
{
	function upgrade_versions( &$installer )
	{
		$this->installer =& $installer;
		$this->ipsclass  =& $installer->ipsclass;
	}

	function run_step()
	{
		foreach( $this->installer->packs as $pack )
		{
			require_once($this->installer->data_dir . $pack . '/pack_info.php' );
			
			$this->ipsclass->DB->do_insert('ams_upgrade_history',array('ams_version_id'=>$pack,'ams_version_human' => $version,'ams_upgrade_date'=>time(),'ams_upgrade_mid'=>$this->ipsclass->member['id']));
		}
		
		$this->installer->status_text .= 'Upgrade history updated.';
	}
}

?>